<?php
namespace Baseapp\Models;
class MasterGroup extends \Phalcon\Mvc\Model
{

    public $id;

    public $group_name;

    public $is_del;

    public function initialize()
    {
        $this->hasMany("id", "Master", "group_id");
    }


    public static function getOptions()
    {
        $res = MasterGroup::find();
        $arr = array();
        foreach ($res as $group) {
            $arr[$group->id] = $group->group_name;
        }
        return $arr;
    }

}
